![]() |
FSClose |
||||
Header: | Files.h | Carbon status: | Supported | |
Closes an open file.
OSErr FSClose ( SInt16 refNum );
The file reference number of an open file.
A result code.
The FSClose function removes the access path for the specified file and writes the contents of the volume buffer to the volume.
The FSClose function calls PBFlushFileSync or PBFlushFileAsync internally to write the file’s bytes onto the volume. To ensure that the file’s catalog entry is updated, you should call FlushVol after you call FSClose.
Make sure that you do not call FSClose with a file reference number of a file that has already been closed. Attempting to close the same file twice may result in loss of data on a volume.
Supported in Carbon. Available in Mac OS 8.1 and later when Carbon 1.0.2 or later is present.
© 2000 Apple Computer, Inc. — (Last Updated 5/8/2000)